<template>
    <div class="border-t">
        <Tabs>
            <TabItem v-for="(item, index) in categorys" :title="item">
                <div class="p-4"><Goods   :data="goods" /></div>
            </TabItem>
        </Tabs>
    </div>
</template>
    
<script setup lang='ts'>
import { tmpData } from '~/views/home/tmp';
const active = ref(0);
const categorys = ['推荐', '低价好物', '省心套餐', '特价尾货']
const goods = ref<any>(tmpData.slice(0, 5))
const loadMore = ({ done }: any) => {
    setTimeout(() => {
        goods.value.push(
            ...tmpData.slice(0, 5)
        )
        done();
    }, 300)

}
defineExpose({
    loadMore
})
</script>
    
<style></style>